package cn.snowheart

/**
 * K-V Map结构
 *
 * @author liuwanxiang
 * @version 2019/05/31
 */
class MapExample {

    static void main(String[] args) {

        def map = [:]
        map.put("hello","你好")
        println map.get("hi")

        for (k in map.keySet()){
            println k
        }

        for (v in map.values()){
            println v
        }

        for (kv in map){
            println kv
        }

        println map.size()
        println map.containsKey("hello")
    }

}
